<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>BinaryTree: BinaryTree.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">BinaryTree
   &#160;<span id="projectnumber">1.0</span>
   </div>
   <div id="projectbrief">Logical design of binary trees and nodes.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">BinaryTree.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_binary_tree_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160; </div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor">#include &lt;iostream&gt;</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="keyword">using namespace </span>std;</div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> Comparable&gt;</div>
<div class="line"><a name="l00018"></a><span class="lineno"><a class="line" href="class_binary_tree.html">   18</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_binary_tree.html">BinaryTree</a></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;{</div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00024"></a><span class="lineno"><a class="line" href="class_binary_tree.html#a48948ead687bb359964378fc9f96e962">   24</a></span>&#160;    <a class="code" href="class_binary_tree.html#a48948ead687bb359964378fc9f96e962">BinaryTree</a>() : root{<span class="keyword">nullptr</span>} {}</div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;    <span class="keyword">virtual</span> ~<a class="code" href="class_binary_tree.html">BinaryTree</a>();</div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;    <span class="keywordtype">void</span> printTree(ostream &amp;out = cout) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;    <span class="keywordtype">void</span> makeEmpty();</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> insert(<span class="keyword">const</span> Comparable &amp;x);</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> insert(Comparable &amp;&amp;x);</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> remove(<span class="keyword">const</span> Comparable &amp;x);</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> remove(Comparable &amp;&amp;x);</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160; </div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;<span class="keyword">protected</span>:</div>
<div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="struct_binary_tree_1_1_node.html">   52</a></span>&#160;    <span class="keyword">struct </span><a class="code" href="struct_binary_tree_1_1_node.html">Node</a></div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;    {</div>
<div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="struct_binary_tree_1_1_node.html#a7ea42fc4b64bacc44e50c83c2fd50fb0">   54</a></span>&#160;        Comparable <a class="code" href="struct_binary_tree_1_1_node.html#a7ea42fc4b64bacc44e50c83c2fd50fb0">element</a>;</div>
<div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="struct_binary_tree_1_1_node.html#ad157b6c3c2702054cad17c6a7c1bacb0">   55</a></span>&#160;        <a class="code" href="struct_binary_tree_1_1_node.html">Node</a> *<a class="code" href="struct_binary_tree_1_1_node.html#ad157b6c3c2702054cad17c6a7c1bacb0">left</a>;</div>
<div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="struct_binary_tree_1_1_node.html#abc7e4f43c4c43222bec0c697b4a7d955">   56</a></span>&#160;        <a class="code" href="struct_binary_tree_1_1_node.html">Node</a> *<a class="code" href="struct_binary_tree_1_1_node.html#abc7e4f43c4c43222bec0c697b4a7d955">right</a>;</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;        <a class="code" href="struct_binary_tree_1_1_node.html">Node</a>(<span class="keyword">const</span> Comparable &amp;theElement, <a class="code" href="struct_binary_tree_1_1_node.html">Node</a> *lt, <a class="code" href="struct_binary_tree_1_1_node.html">Node</a> *rt);</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;        <a class="code" href="struct_binary_tree_1_1_node.html">Node</a>(Comparable &amp;&amp;theElement, <a class="code" href="struct_binary_tree_1_1_node.html">Node</a> *lt, <a class="code" href="struct_binary_tree_1_1_node.html">Node</a> *rt);</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;    };</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160; </div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="class_binary_tree.html#a5f3b3e7aab67967fe53c46f532fb311c">   62</a></span>&#160;    <a class="code" href="struct_binary_tree_1_1_node.html">Node</a> *root = <span class="keyword">nullptr</span>;</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;};</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160; </div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> Comparable&gt;</div>
<div class="line"><a name="l00070"></a><span class="lineno"><a class="line" href="class_bst_tree.html">   70</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_bst_tree.html">BstTree</a> : <span class="keyword">public</span> <a class="code" href="class_binary_tree.html">BinaryTree</a>&lt;Comparable&gt;</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;{</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;<span class="keyword">protected</span>:</div>
<div class="line"><a name="l00076"></a><span class="lineno"><a class="line" href="struct_bst_tree_1_1_bst_node.html">   76</a></span>&#160;    <span class="keyword">struct </span><a class="code" href="struct_bst_tree_1_1_bst_node.html">BstNode</a> : <a class="code" href="class_binary_tree.html">BinaryTree</a>&lt;Comparable&gt;<a class="code" href="struct_binary_tree_1_1_node.html">::Node</a></div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;    {</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;        <a class="code" href="struct_bst_tree_1_1_bst_node.html">BstNode</a>(<span class="keyword">const</span> Comparable &amp;theElement, <a class="code" href="struct_bst_tree_1_1_bst_node.html">BstNode</a> *lt, <a class="code" href="struct_bst_tree_1_1_bst_node.html">BstNode</a> *rt);</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;        <a class="code" href="struct_bst_tree_1_1_bst_node.html">BstNode</a>(Comparable &amp;&amp;theElement, <a class="code" href="struct_bst_tree_1_1_bst_node.html">BstNode</a> *lt, <a class="code" href="struct_bst_tree_1_1_bst_node.html">BstNode</a> *rt);</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;    };</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160; </div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00083"></a><span class="lineno"><a class="line" href="class_bst_tree.html#a951cbcd212eef53b7c1e0d183411a608">   83</a></span>&#160;    <a class="code" href="struct_bst_tree_1_1_bst_node.html">BstNode</a> *root = <span class="keyword">nullptr</span>;</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160; </div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;    <span class="keyword">virtual</span> ~<a class="code" href="class_bst_tree.html">BstTree</a>();</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> insert(<span class="keyword">const</span> Comparable &amp;x);</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> insert(Comparable &amp;&amp;x);</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> remove(<span class="keyword">const</span> Comparable &amp;x);</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> remove(Comparable &amp;&amp;x);</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;    <span class="keyword">const</span> Comparable &amp;findMin() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;    <span class="keyword">const</span> Comparable &amp;findMax() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;};</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160; </div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> Comparable&gt;</div>
<div class="line"><a name="l00113"></a><span class="lineno"><a class="line" href="class_avl_tree.html">  113</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_avl_tree.html">AvlTree</a> : <span class="keyword">public</span> <a class="code" href="class_bst_tree.html">BstTree</a>&lt;Comparable&gt;</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;{</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;<span class="keyword">protected</span>:</div>
<div class="line"><a name="l00119"></a><span class="lineno"><a class="line" href="struct_avl_tree_1_1_avl_node.html">  119</a></span>&#160;    <span class="keyword">struct </span><a class="code" href="struct_avl_tree_1_1_avl_node.html">AvlNode</a> : <a class="code" href="class_bst_tree.html">BstTree</a>&lt;Comparable&gt;<a class="code" href="struct_bst_tree_1_1_bst_node.html">::BstNode</a></div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;    {</div>
<div class="line"><a name="l00121"></a><span class="lineno"><a class="line" href="struct_avl_tree_1_1_avl_node.html#a6ff66d58c5f8d3073d3813ad0cda803d">  121</a></span>&#160;        <span class="keywordtype">int</span> <a class="code" href="struct_avl_tree_1_1_avl_node.html#a6ff66d58c5f8d3073d3813ad0cda803d">height</a>;</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;        <a class="code" href="struct_avl_tree_1_1_avl_node.html">AvlNode</a>(<span class="keyword">const</span> Comparable &amp;ele, <a class="code" href="struct_avl_tree_1_1_avl_node.html">AvlNode</a> *lt, <a class="code" href="struct_avl_tree_1_1_avl_node.html">AvlNode</a> *rt, <span class="keywordtype">int</span> h = 0);</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;        <a class="code" href="struct_avl_tree_1_1_avl_node.html">AvlNode</a>(Comparable &amp;&amp;ele, <a class="code" href="struct_avl_tree_1_1_avl_node.html">AvlNode</a> *lt, <a class="code" href="struct_avl_tree_1_1_avl_node.html">AvlNode</a> *rt, <span class="keywordtype">int</span> h = 0);</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;    };</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160; </div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00127"></a><span class="lineno"><a class="line" href="class_avl_tree.html#a520c315e65c1a87a26ede5c72f565cd4">  127</a></span>&#160;    <a class="code" href="struct_avl_tree_1_1_avl_node.html">AvlNode</a> *root = <span class="keyword">nullptr</span>;</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160; </div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;    <span class="keyword">virtual</span> ~<a class="code" href="class_avl_tree.html">AvlTree</a>();</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> insert(<span class="keyword">const</span> Comparable &amp;x);</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> insert(Comparable &amp;&amp;x);</div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> remove(<span class="keyword">const</span> Comparable &amp;x);</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> remove(Comparable &amp;&amp;x);</div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160; </div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00143"></a><span class="lineno"><a class="line" href="class_avl_tree.html#ae5d5973d06b219a4a58d0bc53c75557a">  143</a></span>&#160;    <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">int</span> ALLOWED_IMBALANCE = 1;</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;    <span class="comment">// Assume t is balanced or within one of being balanced</span></div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;    <span class="keywordtype">void</span> balance(<a class="code" href="struct_avl_tree_1_1_avl_node.html">AvlNode</a> *&amp;t);</div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;    <span class="keywordtype">void</span> rotateWithLeftChild(<a class="code" href="struct_avl_tree_1_1_avl_node.html">AvlNode</a> *&amp;k2);</div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;    <span class="keywordtype">void</span> rotateWithRightChild(<a class="code" href="struct_avl_tree_1_1_avl_node.html">AvlNode</a> *&amp;k1);</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;    <span class="keywordtype">void</span> doubleWithLeftChild(<a class="code" href="struct_avl_tree_1_1_avl_node.html">AvlNode</a> *&amp;k3);</div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;    <span class="keywordtype">void</span> doubleWithRightChild(<a class="code" href="struct_avl_tree_1_1_avl_node.html">AvlNode</a> *&amp;k1);</div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;};</div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> Comparable&gt;</div>
<div class="line"><a name="l00178"></a><span class="lineno"><a class="line" href="class_splay_tree.html">  178</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_splay_tree.html">SplayTree</a> : <span class="keyword">public</span> <a class="code" href="class_bst_tree.html">BstTree</a>&lt;Comparable&gt;</div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;{</div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;<span class="keyword">protected</span>:</div>
<div class="line"><a name="l00184"></a><span class="lineno"><a class="line" href="struct_splay_tree_1_1_splay_node.html">  184</a></span>&#160;    <span class="keyword">struct </span><a class="code" href="struct_splay_tree_1_1_splay_node.html">SplayNode</a> : <a class="code" href="class_bst_tree.html">BstTree</a>&lt;Comparable&gt;<a class="code" href="struct_bst_tree_1_1_bst_node.html">::BstNode</a></div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;    {</div>
<div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;        <a class="code" href="struct_splay_tree_1_1_splay_node.html">SplayNode</a>(<span class="keyword">const</span> Comparable &amp;theElement, <a class="code" href="struct_splay_tree_1_1_splay_node.html">SplayNode</a> *lt, <a class="code" href="struct_splay_tree_1_1_splay_node.html">SplayNode</a> *rt);</div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;        <a class="code" href="struct_splay_tree_1_1_splay_node.html">SplayNode</a>(Comparable &amp;&amp;theElement, <a class="code" href="struct_splay_tree_1_1_splay_node.html">SplayNode</a> *lt, <a class="code" href="struct_splay_tree_1_1_splay_node.html">SplayNode</a> *rt);</div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;    };</div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160; </div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00191"></a><span class="lineno"><a class="line" href="class_splay_tree.html#acfa34a6b533cbbdc2a70dad080e86a1d">  191</a></span>&#160;    <a class="code" href="struct_splay_tree_1_1_splay_node.html">SplayNode</a> *root = <span class="keyword">nullptr</span>;</div>
<div class="line"><a name="l00192"></a><span class="lineno"><a class="line" href="class_splay_tree.html#a9708675102139937fbbe4cd3ab80304c">  192</a></span>&#160;    <a class="code" href="struct_splay_tree_1_1_splay_node.html">SplayNode</a> *nullNode = <span class="keyword">nullptr</span>;</div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160; </div>
<div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;    <span class="keyword">virtual</span> ~<a class="code" href="class_splay_tree.html">SplayTree</a>();</div>
<div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> insert(<span class="keyword">const</span> Comparable &amp;x);</div>
<div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> insert(Comparable &amp;&amp;x);</div>
<div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> remove(<span class="keyword">const</span> Comparable &amp;x);</div>
<div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> remove(Comparable &amp;&amp;x);</div>
<div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160; </div>
<div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;    <span class="keywordtype">void</span> rotateWithLeftChild(<a class="code" href="struct_splay_tree_1_1_splay_node.html">SplayNode</a> *&amp;k2);</div>
<div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;    <span class="keywordtype">void</span> rotateWithRightChild(<a class="code" href="struct_splay_tree_1_1_splay_node.html">SplayNode</a> *&amp;k1);</div>
<div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;    <span class="keywordtype">void</span> splay(<span class="keyword">const</span> Comparable &amp;x, <a class="code" href="struct_splay_tree_1_1_splay_node.html">SplayNode</a> *&amp;t);</div>
<div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;};</div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="astruct_binary_tree_1_1_node_html_a7ea42fc4b64bacc44e50c83c2fd50fb0"><div class="ttname"><a href="struct_binary_tree_1_1_node.html#a7ea42fc4b64bacc44e50c83c2fd50fb0">BinaryTree::Node::element</a></div><div class="ttdeci">Comparable element</div><div class="ttdef"><b>Definition:</b> BinaryTree.h:54</div></div>
<div class="ttc" id="astruct_avl_tree_1_1_avl_node_html"><div class="ttname"><a href="struct_avl_tree_1_1_avl_node.html">AvlTree::AvlNode</a></div><div class="ttdoc">Node with height.</div><div class="ttdef"><b>Definition:</b> BinaryTree.h:119</div></div>
<div class="ttc" id="aclass_bst_tree_html"><div class="ttname"><a href="class_bst_tree.html">BstTree</a></div><div class="ttdoc">A binary search tree.</div><div class="ttdef"><b>Definition:</b> BinaryTree.h:70</div></div>
<div class="ttc" id="astruct_binary_tree_1_1_node_html_ad157b6c3c2702054cad17c6a7c1bacb0"><div class="ttname"><a href="struct_binary_tree_1_1_node.html#ad157b6c3c2702054cad17c6a7c1bacb0">BinaryTree::Node::left</a></div><div class="ttdeci">Node * left</div><div class="ttdef"><b>Definition:</b> BinaryTree.h:55</div></div>
<div class="ttc" id="astruct_avl_tree_1_1_avl_node_html_a6ff66d58c5f8d3073d3813ad0cda803d"><div class="ttname"><a href="struct_avl_tree_1_1_avl_node.html#a6ff66d58c5f8d3073d3813ad0cda803d">AvlTree::AvlNode::height</a></div><div class="ttdeci">int height</div><div class="ttdef"><b>Definition:</b> BinaryTree.h:121</div></div>
<div class="ttc" id="astruct_binary_tree_1_1_node_html"><div class="ttname"><a href="struct_binary_tree_1_1_node.html">BinaryTree::Node</a></div><div class="ttdoc">Basis struct for all nodes.</div><div class="ttdef"><b>Definition:</b> BinaryTree.h:52</div></div>
<div class="ttc" id="aclass_binary_tree_html"><div class="ttname"><a href="class_binary_tree.html">BinaryTree</a></div><div class="ttdoc">Base class for trees.</div><div class="ttdef"><b>Definition:</b> BinaryTree.h:18</div></div>
<div class="ttc" id="astruct_binary_tree_1_1_node_html_abc7e4f43c4c43222bec0c697b4a7d955"><div class="ttname"><a href="struct_binary_tree_1_1_node.html#abc7e4f43c4c43222bec0c697b4a7d955">BinaryTree::Node::right</a></div><div class="ttdeci">Node * right</div><div class="ttdef"><b>Definition:</b> BinaryTree.h:56</div></div>
<div class="ttc" id="aclass_avl_tree_html"><div class="ttname"><a href="class_avl_tree.html">AvlTree</a></div><div class="ttdoc">An Avltree.</div><div class="ttdef"><b>Definition:</b> BinaryTree.h:113</div></div>
<div class="ttc" id="aclass_binary_tree_html_a48948ead687bb359964378fc9f96e962"><div class="ttname"><a href="class_binary_tree.html#a48948ead687bb359964378fc9f96e962">BinaryTree::BinaryTree</a></div><div class="ttdeci">BinaryTree()</div><div class="ttdef"><b>Definition:</b> BinaryTree.h:24</div></div>
<div class="ttc" id="aclass_splay_tree_html"><div class="ttname"><a href="class_splay_tree.html">SplayTree</a></div><div class="ttdoc">A splaytree.</div><div class="ttdef"><b>Definition:</b> BinaryTree.h:178</div></div>
<div class="ttc" id="astruct_bst_tree_1_1_bst_node_html"><div class="ttname"><a href="struct_bst_tree_1_1_bst_node.html">BstTree::BstNode</a></div><div class="ttdoc">Node for binary search tree.</div><div class="ttdef"><b>Definition:</b> BinaryTree.h:76</div></div>
<div class="ttc" id="astruct_splay_tree_1_1_splay_node_html"><div class="ttname"><a href="struct_splay_tree_1_1_splay_node.html">SplayTree::SplayNode</a></div><div class="ttdoc">Node for splay tree.</div><div class="ttdef"><b>Definition:</b> BinaryTree.h:184</div></div>
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>
